package com.myexploit.controller;

import com.myexploit.service.ItemService;
import com.myexploit.vo.EasyUITable;
import org.springframework.beans.factory.annotation.Autowired;



import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/item")
public class ItemController {

	@Autowired
	private ItemService itemService;

	/**
	 * 业务需求:商品信息的分页查询.
	 * url地址: http://Localhost:8091/item/query?page=1&rows=50
	 * 请求参数: page 页数，rows 行数
	 * 返回值结果: EasyUITable
	 *开发顺序: mapper~~service~~~controller~~页面 自下而上的开发
	 *京淘开发顺序: 分析页面需求~~~Controller~~~Service~~~Mapper  自上而下的开发
	 */
	@RequestMapping("/query")
	public EasyUITable findItemByPage(Integer page, Integer rows, HttpServletRequest  request) {
		String a =request.getParameter("12312");

		return itemService.findItemByPage(page,rows);

	}
}